# -*- coding: utf-8 -*-
from i_util.pymysql import PyMySQL

def get_cookie(site_id):
    """
    Args:
        site_id: int
    Returns:
        [{'user_id':'cookie'},...]
    """
    try:
        result = []
        #conn = PyMySQL(host=conf.mysql_host, post=conf.mysql_port, username=conf.username, password=conf.password, database=conf.database)
        #sql = "select `site_id`, `user_id`, `cookie` from cookie where site_id = %s" % site_id
        #cookie_list = conn.fetch(sql, PyMySQL.FETCH_ALL)
        #for record in cookie_list:
        #    result.append({'site_id': site_id, 'user_id': record[1], 'cookie': record[2]})
        return result
    except:
        return []
        pass
